# -*- coding=utf-8 -*-
from ..app_config import AppConfig
from ..api_resources.request_api import RequestApi


class Pay(RequestApi):

    @staticmethod
    def create(**params):
        url = AppConfig._get_base() + "/api/pay/unifiedOrder"
        return RequestApi.call_api(url, params)

    @staticmethod
    def pay_query(**params):
        url = AppConfig._get_base() + "/api/pay/query"
        return RequestApi.call_api(url, params)

    @staticmethod
    def pay_close(**params):
        url = AppConfig._get_base() + "/api/pay/close"
        return RequestApi.call_api(url, params)

    @staticmethod
    def refund(**params):
        url = AppConfig._get_base() + "/api/refund/refundOrder"
        return RequestApi.call_api(url, params)

    @staticmethod
    def refund_query(**params):
        url = AppConfig._get_base() + "/api/refund/query"
        return RequestApi.call_api(url, params)

    @staticmethod
    def channel_user_jump(**params):
        url = AppConfig._get_base() + "/api/channelUserId/jump"
        return RequestApi.call_api(url, params)
